// Fill out your copyright notice in the Description page of Project Settings.

#include "Public/Collectables.h"
#include "Public/UObject/ConstructorHelpers.h"


// Sets default values
ACollectables::ACollectables()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	SetActorEnableCollision(true);
	ColMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("CollectablesMesh"));
	BaseColComponent = CreateDefaultSubobject<USphereComponent>(TEXT("BaseCollisionComponent"));

	ColMesh->AttachToComponent(BaseColComponent, FAttachmentTransformRules::KeepRelativeTransform);

	static ConstructorHelpers::FObjectFinder<UStaticMesh> Sphere(TEXT("StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"));
	if (Sphere.Succeeded()) {
		ColMesh->SetStaticMesh(Sphere.Object);
	}
	ColMesh->SetWorldScale3D(FVector(1,1,1));
	BaseColComponent->SetSphereRadius(16);
}

// Called when the game starts or when spawned
void ACollectables::BeginPlay()
{
	Super::BeginPlay();
	
}

// Called every frame
void ACollectables::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

